package com.asset.dispoal.file.plaintiffFile;


import com.asset.dispoal.file.plaintiffFile.api.PlaintiffFileService;
import com.asset.dispoal.plaintiffFile.dto.PlaintiffFileRequest;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.mhuang.pacebox.springboot.core.controller.BaseController;
import tech.mhuang.pacebox.springboot.protocol.Result;


/**
 * 原告上传文件信息表控制层
 *
 * @author: mhuang
 * @date: 2022-03-22 11:16:35
 */
@RestController
@Api(value = "原告文件管理", tags = "原告文件管理")
@RequestMapping("file/plaintiffFile")
public class PlaintiffFileController extends BaseController {

    @Autowired
    PlaintiffFileService plaintiffFileService;

    @PostMapping(value = "/insert")
    public Result insert(PlaintiffFileRequest request) {
        plaintiffFileService.insert(request);
        return Result.ok();
    }

    @PostMapping(value = "/delete")
    public Result delete(@RequestBody String id) {
        plaintiffFileService.delete(id);
        return Result.ok();
    }
}